package gdou.gym.dao;

import gdou.gym.entity.OrderView;
import gdou.gym.entity.OrderViewExample;
import gdou.gym.vo.AdminQueryOrderSpaceCostVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface OrderViewMapper {
    long countByExample(OrderViewExample example);

    int deleteByExample(OrderViewExample example);

    int insert(OrderView record);

    int insertSelective(OrderView record);

    List<OrderView> selectByExample(OrderViewExample example);

    int updateByExampleSelective(@Param("record") OrderView record, @Param("example") OrderViewExample example);

    int updateByExample(@Param("record") OrderView record, @Param("example") OrderViewExample example);

    List<AdminQueryOrderSpaceCostVo> queryOrderSpaceCostMsg();

    @Select("SELECT  order_no from  order_view   WHERE order_space_site=#{site} and " +
            "order_data=#{date} and order_time=#{time} AND state=FALSE")
    List<String> queryCancelOrderByRequest(
            @Param("site") String site,
            @Param("date") String date,
            @Param("time") String time);
}